package cn.edu.hqu.cst.chapter0204.domain;

import javax.validation.constraints.NotBlank;


public class Order {
    @NotBlank(
            message = "Name is required"
    )
    private String name;
    @NotBlank(
            message = "Id is required"
    )
    private String id;
    @NotBlank(
            message = "Major is required"
    )
    private String major;
    @NotBlank(
            message = "College is required"
    )
    private String college;
    @NotBlank(
            message = "Password code is required"
    )
    private String password;
    private String ccExpiration;

    public String getName() {
        return this.name;
    }

    public String getId() {
        return this.id;
    }

    public String getMajor() {
        return this.major;
    }

    public String getCollege() {
        return this.college;
    }

    public String getPassword() {
        return this.password;
    }

    public String getCcExpiration() {
        return this.ccExpiration;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    public void setCollege(String college) {
        this.college = college;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setCcExpiration(String ccExpiration) {
        this.ccExpiration = ccExpiration;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof Order)) {
            return false;
        } else {
            Order other = (Order) o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$name = this.getName();
                Object other$name = other.getName();
                if (this$name == null) {
                    if (other$name != null) {
                        return false;
                    }
                } else if (!this$name.equals(other$name)) {
                    return false;
                }

                Object this$id = this.getId();
                Object other$id = other.getId();
                if (this$id == null) {
                    if (other$id != null) {
                        return false;
                    }
                } else if (!this$id.equals(other$id)) {
                    return false;
                }

                Object this$major = this.getMajor();
                Object other$major = other.getMajor();
                if (this$major == null) {
                    if (other$major != null) {
                        return false;
                    }
                } else if (!this$major.equals(other$major)) {
                    return false;
                }

                label62:
                {
                    Object this$college = this.getCollege();
                    Object other$college = other.getCollege();
                    if (this$college == null) {
                        if (other$college == null) {
                            break label62;
                        }
                    } else if (this$college.equals(other$college)) {
                        break label62;
                    }

                    return false;
                }

                label55:
                {
                    Object this$password = this.getPassword();
                    Object other$password = other.getPassword();
                    if (this$password == null) {
                        if (other$password == null) {
                            break label55;
                        }
                    } else if (this$password.equals(other$password)) {
                        break label55;
                    }

                    return false;
                }

                Object this$ccExpiration = this.getCcExpiration();
                Object other$ccExpiration = other.getCcExpiration();
                if (this$ccExpiration == null) {
                    if (other$ccExpiration != null) {
                        return false;
                    }
                } else if (!this$ccExpiration.equals(other$ccExpiration)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(Object other) {
        return other instanceof Order;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $name = this.getName();
        result = result * 59 + ($name == null ? 43 : $name.hashCode());
        Object $id = this.getId();
        result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $major = this.getMajor();
        result = result * 59 + ($major == null ? 43 : $major.hashCode());
        Object $college = this.getCollege();
        result = result * 59 + ($college == null ? 43 : $college.hashCode());
        Object $password = this.getPassword();
        result = result * 59 + ($password == null ? 43 : $password.hashCode());
        Object $ccExpiration = this.getCcExpiration();
        result = result * 59 + ($ccExpiration == null ? 43 : $ccExpiration.hashCode());
        return result;
    }

    public String toString() {
        return "Order(name=" + this.getName() + ", id=" + this.getId() + ", major=" + this.getMajor() + ", college=" + this.getCollege() + ", password=" + this.getPassword() + ", ccExpiration=" + this.getCcExpiration() + ")";
    }

    public Order() {
    }
}

